<?php

namespace App\Http\Middleware;

use Closure;
use Mjy191\MyLogs\MyLogs;

class Logs
{
    /**
     * 返回参数值记录post请求，get请求不记录
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        MyLogs::reqLog($request);
        $response = $next($request);
        MyLogs::resLog($request,$response);
        return $response;
    }
}
